#include <QApplication>
#include <QTextCodec>
#include <QTranslator>
#include <QtPlugin>

#include "chatdialog.h"
#include "handwritingframe.h"

Q_IMPORT_PLUGIN(qsqlite)

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));

    QTranslator translator;
    if(translator.load("zh_CN", QObject::tr(":/lang")))
        app.installTranslator(&translator);

    ChatDialog chatDlg;
    chatDlg.show();

    return app.exec();
}
